Skip to content

Conversation

@zedifen
Copy link
Contributor

@zedifen zedifen commented Jun 22, 2023

See also #1215

This PR adds a command-line option --dns-cache-size to sslocal, ssserver and ssmanager, allowing users to configure the cache_size of ResolverOpts in trust-dns.

I'm not sure if the current solution is appropriate, i.e. to pass dns_cache_size all the way to create_resolver. How about I pass the dns_cache_size through a ResolverOpts?

@zonyitoo
Copy link
Collaborator

Please check the clippy logs and fix those warnings.

Copy link
Contributor Author

@zedifen zedifen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve code

@fernvenue
Copy link
Contributor

Maybe mention this change in README?

@zonyitoo
Copy link
Collaborator

Maybe mention this change in README?

Sounds great!

@zedifen zedifen changed the title Add command-line option for "dns-cache-size" Add command-line option "dns-cache-size" for trust-dns Jun 23, 2023
@fernvenue
Copy link
Contributor

Tested, works great :)

@zedifen zedifen requested a review from zonyitoo June 25, 2023 12:09
@zedifen
Copy link
Contributor Author

zedifen commented Jun 26, 2023

I'm going to rebase this branch 😊

Update: rebased.

@zedifen
Copy link
Contributor Author

zedifen commented Jun 26, 2023

Oh, by the way, currently the musl cross-build would fail on stable rust toolchain with recent ziglang versions. Moving to rust nightly would fix it.

Or, the rust is going to stabilize the new musl version shipped with the toolchain in 1.71. See https://blog.rust-lang.org/2023/05/09/Updating-musl-targets.html

One may refer to the PR in my fork of the repository. https://github.com/zedifen/shadowsocks-rust/pull/4

@zonyitoo zonyitoo merged commit fb2192b into shadowsocks:master Jun 27, 2023
@zonyitoo
Copy link
Collaborator

I am still waiting trust-dns to stablize its new version, so it is Ok to wait 1.71 until making the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants